import request from '@/config/axios'

export interface FormDsgnVO {
                    id: number
                    title: string
                    appDsgnId: number
                    resId: number
                    state: number
                    content: string
                    mode: number
                    version: number
                    createDept: number
                    status: number
                    remark: string
}

// 查询表单设计列表
export const getFormDsgnPage = async (params) => {
  return await request.get({ url: '/res/form-dsgn/page', params })
}

// 查询表单设计详情
export const getFormDsgn = async (id: number) => {
  return await request.get({ url: '/res/form-dsgn/get?id=' + id })
}

// 新增表单设计
export const createFormDsgn = async (data: FormDsgnVO) => {
  return await request.post({ url: '/res/form-dsgn/create', data })
}

// 修改表单设计
export const updateFormDsgn = async (data: FormDsgnVO) => {
  return await request.put({ url: '/res/form-dsgn/update', data })
}

// 删除表单设计
export const deleteFormDsgn = async (id: number) => {
  return await request.delete({ url: '/res/form-dsgn/delete?id=' + id })
}

// 导出表单设计 Excel
export const exportFormDsgnApi = async (params) => {
  return await request.download({ url: '/res/form-dsgn/export-excel', params })
}